﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Zhuang.Utility.Common.ConfigFile
{
    public class AppConfigHelper
    {

        public static void SaveAppSetting(string key, string value)
        {
            System.Configuration.Configuration cga = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.None);

            cga.AppSettings.Settings[key].Value = value;

            cga.Save(System.Configuration.ConfigurationSaveMode.Modified);

            System.Configuration.ConfigurationManager.RefreshSection("appSettings");

        }
    }
}
